package com.demo.feign;

import com.demo.fallback.OrderFeignServiceFallback;
import com.demo.fallback.OrderFeignServiceFallbackFactory;
import com.test.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;


@FeignClient(value = "order",path = "/order",
//        fallback = OrderFeignServiceFallback.class,
          fallbackFactory = OrderFeignServiceFallbackFactory.class
)
public interface OrderFeignService {

    @RequestMapping("/findOrderByUserId/{userId}")
    public R findOrderByUserId(@PathVariable("userId") Integer userId);
}
